package com.eian.boot.module.common.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * ID格式配置响应
 *
 * @author alex.meng
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "ID格式配置响应")
public class IdConfigVO {

    @Schema(description = "业务类型标识", example = "order")
    private String bizType;

    @Schema(description = "ID主体内容类型", example = "SEGMENT")
    private String idContentType;

    @Schema(description = "前缀模板类型", example = "FIXED")
    private String prefixTemplate;

    @Schema(description = "ID前缀固定值", example = "ORD")
    private String prefix;

    @Schema(description = "后缀模板类型", example = "FIXED")
    private String suffixTemplate;

    @Schema(description = "ID后缀固定值")
    private String suffix;

    @Schema(description = "补位字符", example = "0")
    private Character padChar;

    @Schema(description = "ID总长度（不包括前后缀，0表示不补位）", example = "10")
    private Integer idLength;

    @Schema(description = "补位位置", example = "LEFT")
    private String padPosition;

    @Schema(description = "是否使用混淆", example = "false")
    private Boolean useObfuscate;

    @Schema(description = "状态：0-禁用, 1-启用", example = "1")
    private Integer status;

    @Schema(description = "业务描述", example = "订单ID配置")
    private String description;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    @Schema(description = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime modifiedAt;
}

